﻿using System;
using System.Windows.Forms;
using DeXrm.Win.Publish.Controllers;
using DeXrm.Win.Publish.Views;

namespace DeXrm.Win.Publish
{
    public partial class FrmMain : Form, IView
    {
        private IControllerFrmMain controlerFrmMain;

        public event ViewHandler<IView> changed;

        public FrmMain()
        {
            InitializeComponent();
            this.Load += FrmMainOnLoad;
        }

        private void FrmMainOnLoad(object sender, EventArgs eventArgs)
        {
            controlerFrmMain.ChangeTheme(rbMain);
        }

        // View will set the associated controller, this is how view is linked to the controller.
        public void setController(IControllerFrmMain cont)
        {
            controlerFrmMain = cont;
        }
    }
}
